#include <stdio.h>
#include <unistd.h>
#include "cmsis_os2.h"
#include "task.h"
#include "sensor.h"

/* Common Definition */
#define IOT_SUCCESS 0
#define IOT_FAILURE (-1)


/* Auto Light */
#define LIGHT_GPIO12_PIN  12
#define LED_GPIO0_PIN  0
#define LIGHT_GPIO12_ADC_CHANNEL 5
#define LED_GPIO_PIN_MODE 0

/* Feeling Light */
#define RED_LED_PIN_NAME 9
#define GREEN_LED_PIN_NAME 10
#define BLUE_LED_PIN_NAME 11
#define RED_LED_PIN_FUNCTION 1
#define GREEN_LED_PIN_FUNCTION 1
#define BLUE_LED_PIN_FUNCTION 1
#define PWM_PORT_NUM_RED  (1)
#define PWM_PORT_NUM_GREEN (2)
#define PWM_PORT_NUM_BLUE (3)

/* Auto Wiper */
#define WIPER_GPIO6_PIN 6
#define RAIN_GPIO8_PIN 8
#define WIPER_GPIO6_GPIO_MODE 0
#define RAIN_GPIO8_GPIO_MODE 0
#define RAIN_GPIO8_ADC_CHANNEL_2 1

/* Seat */
#define SEAT_GPIO7_GPIO_MODE 0
#define SEAT_GPIO7_PIN 7

/* Fan */
#define TH_I2C_SDA_PIN 15  //
#define TH_I2C_SCL_PIN 16
#define FAN_GPIO4_PIN 4 //FI
#define FAN_GPIO5_PIN 5 //BI
#define FAN_GPIO4_GPIO_MODE 2
#define FAN_GPIO5_GPIO_MODE 4
#define TH_I2C_PIN_MODE 2
